package com.team.vlog_temp.Dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class DepartmentPeopleDao {
    private  JdbcTemplate jdbcTemplate;

    @Autowired
    public DepartmentPeopleDao(JdbcTemplate jdbcTemplate) {
        this.jdbcTemplate = jdbcTemplate;
    }


        public List<Map<String, Object>> getPeople() {
            String sql="";
            sql=" SELECT * FROM pua_sectionPeople ";
            return jdbcTemplate.queryForList(sql);
        }




//        public List<Map<String, Object>> getAllMeu() {
//            return jdbcTemplate.queryForList("SELECT * FROM " + "pub_meu");
//        }
//
//        public List<Map<String, Object>> getAllMeuSon(int fatherIs) {
//            return jdbcTemplate.queryForList("SELECT * FROM " + "pub_meu"+" where fatherIs="+fatherIs);
//        }

}
